#include <stdio.h>
#include <stdlib.h>


int main(void)
{
	FILE *file=NULL;
	if((file=fopen("hello.txt","r"))==NULL)
	{
	printf("文件打开失败\n");
	exit(1);
	}

	char ch1=fgetc(file);
	printf("%c\n",ch1);

	char ch2=fgetc(file);
        printf("%c\n",ch2);

	char ch3=fgetc(file);
        printf("%c\n",ch3);


	fputc('d',file);
	
	fclose(file);

	return 0;

}
